package com.wallet.service;

import com.wallet.dao.walletDao;
import com.wallet.entity.wallet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class walletServiceImpl implements walletService{

    @Autowired
    private walletDao dao;

    @Override
    public wallet create(wallet w) {
        return dao.save(w);
    }

    @Override
    public wallet update(wallet w) {
        return dao.save(w);
    }

    @Override
    public List<wallet> findAll() {
        return dao.findAll();
    }

    @Override
    public wallet findOne(Integer id) {
        return dao.findById(id).orElse(null);
    }
}
